<template>
  <div id="DeliveryList">
        <!-- 这是橙人组织页面 -->
       <div class="Header-wrapper">
            <yd-navbar title="简历列表" fontsize="16px" color="#fff" height="45px" bgcolor="#ffd602">
                <div slot="left" @click="golink">
                    <i class="iconfont icon-back Fcolor" ></i>
                </div>
            </yd-navbar>
        </div>
         <div class="head-location typelist">
          <select  class="type" @change="pointtype" v-model="pointtypeid">
            <option value="0" selected>全部</option>
            <option value="100">100分</option>
            <option value="80">80分</option>
            <option value="60">60分</option>
            <option value="40">40分</option>
            <option value="20">20分</option>
            <option value="0">0分</option>
          </select>
    </div>
    <!-- 橙人组织列表 -->
        <div class="organization-list-wrapper" ref="wrapper">
           <transition appear enter-active-class="animated fadeIn" appear-active-class="animated fadeIn">
            <ul>
                <li v-for="item in itemData" :key="item.id">
                    <div class="organization-user">
                        <!-- 用户头像 -->
                        <div class="list-user">
                            <i class="iconfont icon-touxiang user-ico"></i>
                        </div>
                        <!-- 用户信息 -->
                        <div class="list-information">
                            <p>{{item.name}}<span>{{item.point}}分</span></p>
                            <p>{{item.phone}}</p>
                            <p>{{item.fullname}}</p>
                        </div>
                    </div>
                    <!-- 删除操作 -->
                    <div class="operation">
                        <span class="job" v-if="item.jobtype===2">长期</span>
                        <span class="job" v-else>短期</span>
                           <div class="list-delete" @click="toexamine(item.userid,item.jobresumeid)"> 审核</div>
                    </div>
                </li>
            </ul>
            </transition>
        </div>
    </div>
</template>
<script type="text/ecmascript-6">
import BScroll from 'better-scroll'
import apis from '../../../../../static/js/apis.js'
export default {
  data () {
    return {
      itemData: [],
      show1: false,
      Listid: '',
      Listid0: '',
      id: '',
      jobresumeid: '',
      pointtypeid: '0'
    }
  },
  methods: {
    pointtype () {
      // this.changetypeid = value
      // console.log(this.pointtypeid)
      this.$axios.post(apis + '/app/jobresume/getList',
        this.confusion(JSON.stringify({
          id: this.id + '',
          point: this.pointtypeid + ''
        })), {
          headers: {
            Authorization: 'Bearer ' + JSON.parse(window.localStorage.getItem('userInfo')).token,
            'Content-Type': 'application/json;charset=UTF-8',
            'Cache-Control': 'no-cache',
            isApp: 'isApp'
          }
        }
      ).then((response) => {
        // console.log(response)
        this.itemData = response.data
        this.jobresumeid = this.itemData[0].id
        // console.log(this.userList.length)
      }).catch((error) => {
        console.log(error)
      })
    },
    golink () {
      window.history.go(-1)
    },
    toexamine (userid, jobresumeid) {
      console.log(userid, jobresumeid)
      this.$router.push({
        path: '/personal/examine',
        query: {
          id: userid,
          id1: this.jobresumeid
        }
      })
    }
  },
  mounted () {
    this.$nextTick(() => {
      this.scroll = new BScroll(this.$refs.wrapper, {
        click: true,
        taps: true
      })
    })
  },
  created () {
    // console.log(this.pointtypeid)
    this.id = this.$route.query.Listid
    this.$axios
      .post(
        apis + '/app/jobresume/getList',
        this.confusion(
          JSON.stringify({
            id: this.id + '',
            point: this.pointtypeid + ''
          })
        ),
        {
          headers: {
            Authorization: 'Bearer ' + JSON.parse(window.localStorage.getItem('userInfo')).token,
            'Content-Type': 'application/json;charset=UTF-8',
            'Cache-Control': 'no-cache',
            isApp: 'isApp'
          }
        }
      )
      .then(response => {
        this.itemData = response.data
        this.jobresumeid = this.itemData[0].id
        // console.log(this.itemData[0])
      })
      .catch(error => {
        console.log(error)
      })
  },
  components: {
    apis
  }
}
</script>
<style scoped>
.typelist{
  background: #f1f1f1;
  height: 42px;
  text-align: center;
}
.type{
  line-height: 42px;
  padding: 0 6%;
  border: none;
  text-align: center;
  font-size: 12px;
  background: url("./../../../../assets/img/xiala.png") no-repeat right center transparent;
  background-size: 30px;
  outline: none;
}
.icon-back {
  font-size: 24px;
}
.Fcolor {
  color: #fff;
}
/* 下拉列表 */
.heade-location-wrapper {
  width: 100%;
  height: 42px;
  line-height: 42px;
  text-align: center;
  background: #f1f1f1;
  overflow: hidden;
}
/* 橙人组织列表 */
.organization-list-wrapper {
  position: fixed;
  top: 87px;
  bottom: 0;
  width: 100%;
  overflow: hidden;
}
.organization-list-wrapper ul li {
  display: flex;
  margin-bottom: 6px;
  width: 100%;
  background: #fff;
  overflow: hidden;
  padding: 20px 12px;
}
.organization-user {
  flex: 7;
  overflow: hidden;
}
/* 用户头像 */
.list-user {
  width: 60px;
  height: 60px;
  float: left;
  overflow: hidden;
  border-radius: 50%;
  margin-right: 10px;
}
.user-ico {
  width: 100%;
  font-size: 60px;
  color: #ffd602;
}
.list-information {
  float: left;
  overflow: hidden;
}
.list-information p {
  width: 100%;
  line-height: 20px;
  font-size: 14px;
  color: #333;
}
.list-information p span{
  color: red;
  font-size: 14px;
  margin-left: 10px;
}
.operation {
  flex: 3;
  overflow: hidden;
  text-align: right;
}
/* 职位 */
.job {
  display: block;
}
/* 删除按钮 */
.list-delete {
  color: #fff;
  width: 42px;
  height: 22px;
  font-size: 12px;
  background: #ffd602;
  margin-top: 20px;
  float: right;
  text-align: center;
  line-height: 22px;
  border-radius: 10px;
}
/* 弹窗 */
.popup-content {
  position: relative;
  width: 282px;
  height: 207px;
  border-radius: 5px;
  background: #fff;
}
.remind {
  line-height: 156px;
  font-size: 15px;
  text-align: center;
  color: #333;
}
/* 弹窗底部 */
.popup-pdecision {
  display: flex;
  position: absolute;
  width: 100%;
  height: 56px;
  bottom: 0;
  justify-content: space-around;
  align-items: center;
  background: #f0f0f0;
}
/* 取消，删除按钮 */
.cancel,
.delete {
  width: 112px;
  height: 26px;
  font-size: 11px;
  color: #fff;
  background: #b3b3b3;
}
.delete {
  background: #ff5b5b;
}
</style>
